1. Field of Invention
The present invention relates to a real-time distributed database system and method.
2. Description of Related Art
Distributing computer applications across multiple processors (nodes) has been an important requirement in systems development for some time. Each of the distributed applications have a need to share data in order to perform their allocated functions. For small systems this has been accomplished by sending all data in discrete application messages, but when a large amount of data is required, a database solution is necessary. The typical solution is to maintain a single database on one node, and have all other remote applications query that node when they need data from the database. While one node is accessing the data, the other nodes are locked out to maintain data integrity.
This "client-server" paradigm works well for non-real-time applications where the volume of data accessed is low and the frequency of those accesses is also low. The client-server paradigm, however, cannot support the high speed access and high data rates generally required by real-time applications. This is caused by the delays associated with the network access and the "wait" time associated with locking mechanisms to prevent more than one access at a time. In addition, as the number of client nodes grows large, the bandwidth of the network becomes a limiting factor due to the large number of duplicated data requests and the associated data transfers as each client requests and receives data.
Some commercial database vendors have developed a replication feature that allows a database to be mirrored on another node for fail safe purposes. This "copy" is for backup purposes only, and the copies associated with the mirroring function further degrade effective network bandwidth. In addition, this backup scheme requires a dedicated backup node strictly for the database.
Other conventional solutions provide for local copies of the data to improve access times, but these schemes require a master database and a backup database and periodically check consistency of the remote copies against the master. This consistency checking can steal a significant amount of time for checking and repair. These solutions also fail to ensure that the database updates are received by the remote nodes in the correct sequence.
Conventional systems that use a master database have a data maintenance problem. When one processor updates a portion of the common data, all other nodes are prevented from accessing that data until the update is complete. This is usually implemented using a series of locks. When an application needs to update a portion of common data, it first performs a series of network transactions to acquire a lock on the data to be updated. Locked data cannot be updated by other applications and in some systems can not be read by other applications until the locks are removed. When an application successfully acquires a lock, it updates the information in the database (first in a local copy if a local copy of the database is maintained, and then in the master database). Network operations are performed that update the data in all other copies of the database. When all updates are complete the holder of the lock releases the lock and other applications may again access the modified data.
There are several serious problems associated with the conventional solutions to this problem. First the update process is extremely slow and is therefore not applicable for real-time and near-real-time systems. In addition, duplication of data significantly cuts into available network bandwidth. Another problem associated with the locking mechanisms is that when processors fail they run the risk of leaving data inaccessible by not releasing the locks. Conventional systems correct this problem by implementing complicated, time-consuming, cleanup processing to make the database usable to the remaining processors after a processor failure. Once again this is not an acceptable situation for real-time and near-real-time systems. Finally, the maintenance of a master copy of the data reduces overall system reliability since the system is dependent on the two machines maintaining the master and backup databases.